import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import About from '../views/About.vue'
import Homeson from '../components/Homeson.vue'
import Myson from '../components/Myson.vue'
import Showsson from '../components/Showsson.vue'
import Souson from '../components/Souson.vue'
import Foodsson from '../components/Foodsson.vue'
import Lists from '../components/Lists.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    children: [
      {
        path: 'homeson',
        component:Homeson
      },
      {
        path: '',
        component:Souson
      },
      {
        path: 'foodsson',
        component:Foodsson
      },
      {
        path: 'showsson',
        component:Showsson
      },
      {
        path: 'myson',
        component:Myson
      },
      {
        path: 'lists',
        component:Lists
      }
    ]
  },{
    path:'/about',
    name:About,
    component: () => import( '../views/About.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
